package com.zengqingfa.designpattern.create.builder.simple;

import java.util.regex.Pattern;

/**
 *
 * @fileName: Client
 * @author: zengqf3
 * @date: 2021-4-22 13:52
 * @description:
 */
public class Client {

    public static void main1(String[] args) {
        ConcreteBuilder builder=new ConcreteBuilder();
        Product product = builder.setPart1("part1").setPart2("part2").builder();
        //Product{part1='part1', part2='part2'}
        System.out.println(product);
    }

    public static void main(String[] args){
        String content = "A2";

        // String pattern = "^[A-Z][0-9][0-9]";
        String pattern1 = "^[ADWS][0-9]{1,2}";

        boolean isMatch = Pattern.matches(pattern1, content);
        System.out.println(isMatch);
        boolean matches = content.matches(pattern1);
        System.out.println(matches);
    }
}
